package com.itheima_01.test;

import java.util.Arrays;

public class test2 {
    public static void main(String[] args) {
        String str="23 36 56 63 98 54 982 54";
        String[] sp = str.split(" ");
        int arr[]=new int [sp.length];
        for (int i = 0; i < arr.length; i++) {
            arr[i]=Integer.parseInt(sp[i]);
        }
        Arrays.sort(arr);
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < arr.length; i++) {
            if(i==arr.length-1){
                stringBuilder.append(arr[i]);
            }else {
                stringBuilder.append(arr[i]).append(" ");
            }
        }
        String s = stringBuilder.toString();
        System.out.println(s);
    }
}
